local skynet     = require "skynet"
local json       = require "cjson.safe"
local http_agent = require "bw.server.http_agent"
local bewater    = require "bw.bewater"
local log        = require "bw.log"
local sname      = require "sname"
local passport   = bewater.proxy(sname.PASSPORT)

require "api.version"
require "api.user.authorization"
require "api.user.get_values"
require "api.user.get_value"
require "api.user.set_value"
require "api.rank.submit"
require "api.rank.request"

log.debug("start agent")

local M = {}

function M.auth(p)
    return passport.get_uid(p)
end

http_agent.start(M)
